﻿<UserControl x:Class="OpenRm.Server.Gui.Modules.Monitor.Views.AgentSummaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:prism="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="3*" />
        </Grid.RowDefinitions>
        <GroupBox Grid.Row="0">
            <ScrollViewer HorizontalScrollBarVisibility="Auto">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelsOne"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"  SharedSizeGroup="ValuesOne"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelsTwo"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"  SharedSizeGroup="ValuesTwo"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelsTwo"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"  SharedSizeGroup="ValuesTwo"/>
                    <ColumnDefinition Width="*"  SharedSizeGroup="HiddenColumn"/>
                    <ColumnDefinition Width="5"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Name:" Grid.Column="1"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.Idata.DeviceName}" Grid.Column="3"
                       VerticalAlignment="Center"/>
                <TextBlock Text="Serial Number:" Grid.Column="5"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.Idata.SerialNumber}" Grid.Column="7"
                       VerticalAlignment="Center"/>
                <TextBlock Text="IP Address:" Grid.Column="9"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.IpConfig.IpAddress}" 
                       Grid.Column="11" VerticalAlignment="Center"/>
                <TextBlock Text="Subnet Mask:" Grid.Column="1" Grid.Row="1"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.IpConfig.NetMask}" 
                       Grid.Column="3" Grid.Row="1" VerticalAlignment="Center"/>
                <TextBlock Text="Default Gateway:" Grid.Column="5" Grid.Row="1"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.IpConfig.DefaultGateway}" 
                       Grid.Column="7" Grid.Row="1" VerticalAlignment="Center"/>
                <TextBlock Text="MAC Address:" Grid.Column="9" Grid.Row="1"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.IpConfig.MAC}" 
                       Grid.Column="11" Grid.Row="1" VerticalAlignment="Center"/>

                <TextBlock Text="Operating System:" Grid.Column="1" Grid.Row="2"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.OsName}" 
                       Grid.Column="3" Grid.Row="2" VerticalAlignment="Center"/>
                <TextBlock Text="OS Version:" Grid.Column="5" Grid.Row="2"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.OsVersion}" 
                       Grid.Column="7" Grid.Row="2" VerticalAlignment="Center"/>
                <TextBlock Text="OS Architecture:" Grid.Column="9" Grid.Row="2"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.OsArchitecture}" 
                       Grid.Column="11" Grid.Row="2" VerticalAlignment="Center"/>
                <TextBlock Text="RAM Size (Mb):" Grid.Column="1" Grid.Row="3"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.RamSize}" 
                       Grid.Column="3" Grid.Row="3" VerticalAlignment="Center"/>
                <TextBlock Text="System Drive:" Grid.Column="5" Grid.Row="3"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.SystemDrive}" 
                       Grid.Column="7" Grid.Row="3" VerticalAlignment="Center"/>
                <TextBlock Text="System Drive Size (Gb):" Grid.Column="9" Grid.Row="3"
                       VerticalAlignment="Center"/>
                <TextBlock Text="{Binding CurrentEntity.Data.OS.SystemDriveSize}" 
                       Grid.Column="11" Grid.Row="3" VerticalAlignment="Center"/>
            </Grid>
            </ScrollViewer>
        </GroupBox>

        <!--The Tab control defines a region, TabRegion, into which the EmployeeDetailsView and EmployeeProjectsView will be displayed.-->
        <!--The TabRegion defines a RegionContext which provides a reference to the currently selected employee.-->
        <TabControl Grid.Row="1" Margin="8"
                        prism:RegionManager.RegionName="TabRegion"
                        prism:RegionManager.RegionContext="{Binding CurrentEntity}"
                        SelectedIndex="{Binding SelectedTabIndex, Mode=OneWayToSource}"
                        Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <TabControl.ItemContainerStyle>
                <Style TargetType="{x:Type TabItem}">
                    <Setter Property="Header" Value="{Binding Content.DataContext.Header, RelativeSource={RelativeSource Self}}" />
                </Style>
            </TabControl.ItemContainerStyle>
        </TabControl>
    </Grid>
    
    
    
    <!--<Grid>
        
        
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="{x:Type TabItem}">
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="Header" Value="{Binding Content.DataContext.HeaderInfo, RelativeSource={RelativeSource Self}}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabItem}">
                            <Grid>
                                <Border BorderThickness="1" BorderBrush="Gray" Padding="2">
                                    <ContentPresenter x:Name="Content" ContentSource="Header" RecognizesAccessKey="True"/>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="true">
                                    <Setter TargetName="Content" Property="Opacity" Value="1"/>
                                </Trigger>
                                <Trigger Property="IsSelected" Value="false">
                                    <Setter TargetName="Content" Property="Opacity" Value="0.5"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        
        <TextBlock Text="{Binding CurrentEntity.Name}"/>

        
    </Grid>-->
    <!--The Tab control defines a region, TabRegion, into which the EmployeeDetailsView and EmployeeProjectsView will be displayed.-->
    <!--The TabRegion defines a RegionContext which provides a reference to the currently selected employee.-->
    <!--<TabControl Grid.Row="1" Margin="8"
                        prism:RegionManager.RegionName="TabRegion"
                        prism:RegionManager.RegionContext="{Binding CurrentEntity}"
                        Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        </TabControl>-->


    <!--<Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>


        <DockPanel Grid.Row="1">
            <Label Content="Main Content Area" FontSize="22"
               VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </DockPanel>

        <StackPanel VerticalAlignment="Bottom">
            <StackPanel.Style>
                <Style>
                    <Setter Property="Grid.Row" Value="1"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ElementName=LeftPinBtn,Path=IsChecked}" Value="True">
                            <Setter Property="Grid.Row" Value="0"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </StackPanel.Style>
            <ToggleButton Content="Pin" x:Name="LeftPinBtn"/>
        </StackPanel>-->
</UserControl>
